package me.hl.mysynchronized;

/**
 * Created by Planck on 2016/1/28.
 */
public class NoneSynchonizedTest implements Runnable {
    public static int num = 0;


    public static void sum() {
        num++;
    }

    public void run() {
        sum();
        System.out.println(num);
    }


    public static void main(String args[]) throws Exception {
        for (int i = 0; i < 10000; i++) {
            new Thread(() -> {
                new NoneSynchonizedTest().run();
            }).start();
        }
        Thread.sleep(1000);

    }
}
